export const routes = [
    //404路由
    {
        path: '/404',
        name: '404',
        component: () => import('../views/error/404.vue'),
        meta: {
            hidden: true
        }
    },
    //home首页
    {
        // 此处修改首页路由  路径  index
        path: '/',
        component: () => import('../layout/index.vue'),
        redirect: '/index',
        children: [
            {
                path: 'index',
                component: () => import('../views/recommend/index.vue'),
                name: 'Index',
                redirect: "/index/recommend",
                // 资源 页  下方推荐  作品  教程  等的路由组件
                children: [
                    {
                        path: 'recommend',
                        component: () => import('../views/recommend/videoList/index.vue'),
                        name: 'Recommend',
                    },
                    {
                        path: 'original',
                        component: () => import('../views/recommend/chartsList/index.vue'),
                        name: 'Original',
                    },
                    {
                        path: 'course',
                        component: () => import('../views/recommend/chartsList/index.vue'),
                        name: 'Course',
                    },
                    {
                        path: 'specialTopic',
                        component: () => import('../views/recommend/chartsList/index.vue'),
                        name: 'SpecialTopic',
                    },
                    {
                        path: 'information',
                        component: () => import('../views/recommend/videoList/index.vue'),
                        name: 'Information',
                    },
                    {
                        path: 'attention',
                        component: () => import('../views/recommend/attention/index.vue'),
                        name: 'Attention',
                    },
                    // 最后舞蹈的路由路径不知道咋搞了   因为后面可以添加其他物种，目前暂定为params带参
                    {
                        path: '/index/:id',
                        component: () => import('../views/recommend/videoList/index.vue'),
                        name: 'Dance',
                    }

                ]
            },
            // 视频
            {
                path: 'detail',
                name: 'Detail',
                redirect: "/detail/video",
                children:[
                    {
                    path: 'video',

                    }
                ]
            },
           
            // 课程
            {
                path: 'discovery',
                component: () => import('../views/discovery/index.vue'),
                name: 'Discovery',
                redirect: '/discovery/memberZone',
                children: [{
                    // 会员专区
                    path: 'memberZone',
                    component: () => import('../views/discovery/memberZone/index.vue'),

                    name:'MemberZone',
                    children:[{
                        // 综合排序
                        path:'sort',
                        component: () => import('../views/discovery/memberZone/exhibition/sort/index.vue'),
                        name:'Sort',
                    },{
                        // 销量
                        path:'salesVolume',
                        component: () => import('../views/discovery/memberZone/exhibition/salesVolume/index.vue'),
                        name:'SalesVolume'
                    },{
                        //浏览量
                        path:'viewItem',
                        component: () => import('../views/discovery/memberZone/exhibition/viewItem/index.vue'),
                        name:'ViewItem'
                    },{
                        // 价格
                        path:'price',
                        component: () => import('../views/discovery/memberZone/exhibition/price/index.vue'),
                        name:'Price'
                    },{
                        // 发布时间
                        path:'releaseTime',
                        component: () => import('../views/discovery/memberZone/exhibition/releaseTime/index.vue'),
                        name:'ReleaseTime'
                    }
                ]
                },{
                    //  视频课
                    path: 'liveClass',
                    component: () => import('../views/discovery/liveClass/index.vue'),
                    name: 'LiveClass',
                }, {
                    // 直播课
                    path: 'liveBroadcast',
                    component: () => import('../views/discovery/liveBroadcast/index.vue'),
                    name: 'LiveBroadcast',
                }, {
                    // 主题
                    path: 'theme',
                    component: () => import('../views/discovery/theme/index.vue'),
                    name: 'Theme',
                }
                ]
            },
            // 练习室
            {
                path: 'training',
                component: () => import('../views/training/index.vue'),
                name: 'Training',
                redirect: '/training/room',
                children: [{
                    path: 'room',
                    component: () => import('../views/training/rightroom.vue'),
                    name: 'Room',
                }, {
                    path: 'history',
                    component: () => import('@/views/training/righthistory.vue'),
                    name: 'History',
                },{
                    path: 'detail',
                    component: () => import('@/views/training/detail/index.vue'),
                    name: 'Detail',
                }
                ]
            },
            // 我的
            {
                path: 'center',
                component: () => import('../views/center/index.vue'),
                name: 'Center',
                redirect:'/center/resource',
                children: [
                    {
                        path: 'resource',
                        component: () => import('../views/center/resource/resource.vue')
                    },
                    {
                        path: 'member',
                        component: () => import('../views/center/member/member.vue')
                    },
                    {
                        path: 'Information',
                        component: () => import('../views/center/information/Information.vue')
                    },
                ]
            },
            // 登录
            {
                path: 'login',
                component: () => import('../views/login/index.vue'),
                name: 'Login',
            },
            // 注册
            {
                path: 'register',
                component: () => import('../views/register/index.vue'),
                name: 'Register'
            },
            // 订单
            {
                path: 'pay',
                component: () => import('../views/order/order.vue'),
                name: 'Pay'
            }
        ]
    },
    

    // 任意路由
    {
        path: '/:pathMatch(.*)',
        name: 'Any',
        redirect: '/404',
        meta: {
            hidden: true
        }
    }
]


